home *** CD-ROM | disk | FTP | other *** search
- ---XREF.DOC---
-
- XREF Cross-reference and Symbol Listing Facility
-
-
- XREF is a tool that creates a cross-referenced symbol table listing of your
- program.
-
- To invoke XREF, you must provide a program invocation line, either typed to the
- console when the DOS command prompt appears, or included in a batch file. The
- program invocation line consists of the following:
-
- 1. The program name XREF.
-
- 2. The name of a symbol-table file produced by A86 when you assembled your
- program. If you do not give an extension, XREF assumes a .SYM extension;
- if you wish no extension, you give a period without an extension. Note that
- if you follow normal methodology, the name of the symbol-table file is the
- same as the name of the program.
-
- 2. The same list of source-file names that you gave to A86. Just as with A86,
- you may use the wild-card delimiters * and ? if you wish, with the same
- results.
-
- XREF, like A86, identifies the end of the source file names when it sees a
- name with no extension, or a name with the default output-extension. For
- XREF, that extension is .XRF.
-
- 3. You may optionally provide the word TO, to separate the source file names
- from the output file names.
-
- 4. The name of the output listing file. If you do not provide an extension,
- XREF will assume that you want the extension .XRF. If you want your program
- file to have no extension, you end the file name with a period.
-
- You have the option to omit the output file name. If you do, XREF will use
- the name of the symbol-table file, with the extension .XRF.
-
-
- The output of XREF is an alphabetical listing of all the non-local symbols in
- your program. For each symbol, XREF gives its type, the file in which it was
- defined, its value, and a list of all procedures in which the file was used.
- If you print this file, you typically use the TCOLS tool to obtain a multi-
- column listing from XREF's single-column output.
-
- Note the use of procedure names to identify references -- this is unique to
- the A86 package, and makes the cross-reference listing truly readable. Other
- cross-reference listings give either line numbers, which are meaningless
- unless you go find the associated line; or a file-name, which doesn't give
- you as much useful information.
-
- Here is a more detailed description of the various pieces of information
- provided for each symbol:
-
- 1. TYPE. Labels are indicated by a colon immediately following the symbol-
- name. Macros are denoted by the word "macro" in place of the value on
- the following line. Other symbols types are described by one or two
- characters, following the symbol name. Possibilities for the first
- character are:
-
- m for a simple memory variable
- + for an index memory quantity
- c for a constant
- i for an interrupt-equate
- s for a structure
-
- If there is a second letter, it is a size attribute: b for byte, w for
- word, f for far (or doubleword).
-
- 2. FILE in which the symbol was defined. The name is stripped of its
- extension, which is presumably the same for all your source files. The
- name is preceded by = or period , which denotes a definition, not a
- reference, of the symbol.
-
- 3. VALUE, given as 4 hex bytes, on the line following the symbol. For
- memory variables, this is the location of the variable. For indexed
- quantities, this is the constant-displacement part of the quantity.
- For structures, it is the size of the structure. For interrupt-equates,
- it is the number of the interrupt.
-
- 4. REFERENCES, given on indented lines following the symbol name. All
- occurances of the symbol in your program produce a reference. If the
- symbol is the first thing of a line, it is considered a "definition" of
- that symbol, the reference listed is the source file name. The name is
- preceded by a period if the definition was via a colon (i.e., a label); it
- is preceded by an equals-sign otherwise. If the symbol is not the first
- thing of the line, then it is not a definition. The reference-listing
- consists of the name of the last definition that XREF scanned (which, if
- your program is organized in a standard way, will be the name of the
- procedure in which the reference occurred.
-
- Observe that you must use the local-label facility of A86 to make this
- work. If you don't use local-labels as your "place-marker" symbols,
- the symbol XREF gives you will often be the name of the last "place-marker"
- symbol, not the name of the last procedure.
-
- To save space, duplicate reference-entries are denoted by a single entry,
- followed by "*n", where n is the decimal number of occurrances of that
- entry.
-